import request from '../../utils/request';
import { OnionUtils } from '../../utils/onion-utils';

//应用列表查询
export const listApp = queryData => {
    return request({
        url: '/api/appic/app/list',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//应用列表查询【分页】
export const listAppByPage = queryData => {
    return request({
        url: '/api/appic/app/listPage',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'queryData'},
        buildType : 'queryData',
        data: queryData
    });
};

//保存应用信息
export const saveApp = formData => {
    return request({
        url: '/api/appic/app/save',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: formData
    });
};

//查询应用信息
export const getApp = paramData => {
    return request({
        url: '/api/appic/app/save',
        method: 'post',
        header:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};

//删除应用信息
export const deleteApp = paramData => {
    return request({
        url: '/api/appic/app/delete',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};

//查询应用实例
export const listAppNodes = paramData =>{
    return request({
        url: '/api/appic/app/listAppNodes',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};

//获取应用节点实例
export const getAppNode = paramData =>{
    return request({
        url: '/api/appic/app/getAppNode',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};

//获取应用节点实例
export const saveAppNode = paramData =>{
    return request({
        url: '/api/appic/app/saveAppNode',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
};

//删除应用节点实例
export const deleteAppNode = paramData =>{
    return request({
        url: '/api/appic/app/deleteAppNode',
        method: 'post',
        headers:{'Content-Type':'application/json', 'Build-Type':'formData'},
        data: paramData
    });
}